using System;
using System.Collections.Generic;
using System.Text;
namespace BLL.BusinessLayer
{
	[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
	[Serializable]
	public class ClsCategories: BusinessObjectBase
	{

		public ClsCategories() {}

		#region InnerClass
		public enum ClsCategoriesFields
		{
			CategoryID,
			CategoryName,
			Tags,
			Description,
			LanguageID,
			UserID
		}
		#endregion

		#region Data Members

			int _categoryID;
			string _categoryName;
			string _tags;
			string _description;
			int? _languageID;
			int? _userID;

		#endregion

		#region Properties

		public int  CategoryID
		{
			 get { return _categoryID; }
			 set
			 {
				 if (_categoryID != value)
				 {
					_categoryID = value;
					 PropertyHasChanged("CategoryID");
				 }
			 }
		}

		public string  CategoryName
		{
			 get { return _categoryName; }
			 set
			 {
				 if (_categoryName != value)
				 {
					_categoryName = value;
					 PropertyHasChanged("CategoryName");
				 }
			 }
		}

		public string  Tags
		{
			 get { return _tags; }
			 set
			 {
				 if (_tags != value)
				 {
					_tags = value;
					 PropertyHasChanged("Tags");
				 }
			 }
		}

		public string  Description
		{
			 get { return _description; }
			 set
			 {
				 if (_description != value)
				 {
					_description = value;
					 PropertyHasChanged("Description");
				 }
			 }
		}

		public int?  LanguageID
		{
			 get { return _languageID; }
			 set
			 {
				 if (_languageID != value)
				 {
					_languageID = value;
					 PropertyHasChanged("LanguageID");
				 }
			 }
		}

		public int?  UserID
		{
			 get { return _userID; }
			 set
			 {
				 if (_userID != value)
				 {
					_userID = value;
					 PropertyHasChanged("UserID");
				 }
			 }
		}


		#endregion

		#region Validation

		internal override void AddValidationRules()
		{
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("CategoryID", "CategoryID"));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("CategoryName", "CategoryName",100));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Tags", "Tags",500));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Description", "Description",1000));
		}

		#endregion

	}
}
